package com.jingdianjichi.subject.application.convert;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jingdianjichi.subject.application.dto.SubjectInfoDTO;
import com.jingdianjichi.subject.application.dto.SubjectLabelDTO;
import com.jingdianjichi.subject.common.entity.PageResult;
import com.jingdianjichi.subject.entity.SubjectAnswerBO;
import com.jingdianjichi.subject.entity.SubjectInfoBO;
import com.jingdianjichi.subject.entity.SubjectLabelBO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface SubjectInfoDTOConverter {
    SubjectInfoDTOConverter Instance= Mappers.getMapper(SubjectInfoDTOConverter.class);

    @Mappings({
            @Mapping(source = "pageSize", target = "pageSize"),
            @Mapping(source = "pageNo", target = "pageNo")
    })
    SubjectInfoBO convertDTOToBO(SubjectInfoDTO subjectInfoDTO);

    @Mappings({
            @Mapping(source = "pageSize", target = "pageSize"),
            @Mapping(source = "pageNo", target = "pageNo")
    })
    SubjectInfoDTO convertBOToDTO(SubjectInfoBO subjectInfoBO);

    PageResult<SubjectInfoDTO> convertBOToDTO(PageResult<SubjectInfoBO> subjectInfoBOPageResult);

}
